//
//  About_friends.m
//  K-Music
//
//  Created by CHUN on 16/1/15.
//  Copyright © 2016年 CHUN. All rights reserved.
//

#import "About_friends.h"

@interface About_friends ()

@end

@implementation About_friends


-(void)viewWillAppear:(BOOL)animated{
    self.tabBarController.tabBar.hidden = YES;
}
- (void)viewWillDisappear:(BOOL)animated
{
    self.tabBarController.tabBar.hidden = NO;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = RGB(241, 241, 241);
    self.navigationItem.title = @"关于会员";
    
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithIcon:@"back" highIcon:@"back" target:self action:@selector(back_back)];
    
    
    NSString * about = [NSString stringWithFormat:@"%@", [User_information conversion].about_H];
    
//    CGSize labelSize = [about sizeWithFont:[UIFont boldSystemFontOfSize:15.0f]
//                       constrainedToSize:CGSizeMake(WIDTH*7/8, 500)
//                           lineBreakMode:UILineBreakModeCharacterWrap];     UILabel *patternLabel = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH/16, 20, labelSize.width, labelSize.height)];
//    patternLabel.text = about;
//    patternLabel.backgroundColor = [UIColor clearColor];
//    patternLabel.numberOfLines = 0;
//    patternLabel.lineBreakMode = UILineBreakModeCharacterWrap;    [self.view addSubview:patternLabel];
    
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH/16, 20, WIDTH*7/8, HEIGHT)];
    [label setBackgroundColor:[UIColor clearColor]];
    [label setTextColor:[UIColor blackColor]];
    
    [label setNumberOfLines:0];
    
    NSString *labelText = about;
    
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:labelText];
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    
    [paragraphStyle setLineSpacing:10];//调整行间距
    
    [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [labelText length])];
    label.attributedText = attributedString;
    [self.view addSubview:label];
    [label sizeToFit];

    
    
}
- (void)back_back
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
